<?php

if (!defined('MEDIAWIKI')) {
    echo <<<EOT
Line for LocalSettings.php. 
require_once('extensions/Deathray/Deathray.php');
EOT;
    exit( 1 );
}

$wgExtensionCredits['specialpage'][] = array(
    'author'    => 'FunPika',
    'name'        => 'Testwikirc',
    'svn-date'    => '$LastChangedDate: 2008-10-19 15:11:38 +0000 (Sun, 19 Oct 2008) $',
    'svn-revision'    => '$LastChangedRevision: 46 $',
    'url'         => 'http://code.google.com/p/testwiki-extensions/',
    'description'    => 'Allows you to delete the main page without sysop rights!!!',
    'descriptionmsg' => 'deathray-desc',
);

$dir = dirname(__FILE__);

$wgExtensionMessagesFiles['Deathray'] = "$dir/Deathray.i18n.php";
$wgExtensionAliasesFiles['Deathray'] = "$dir/Deathray.alias.php";
 
$wgAutoloadClasses['Deathray'] = "$dir/Deathray_body.php";

$wgSpecialPages['Deathray'] = 'Deathray';

$wgSpecialPageGroups['Deathray'] = 'wiki';

$wgHooks['LanguageGetSpecialPageAliases'][] = 'DeathrayLocalizedPageName';

function DeathrayLocalizedPageName(&$specialPageArray, $code) {
  wfLoadExtensionMessages('Deathray');
  $text = wfMsg('deathray');
 
  $title = Title::newFromText($text);
  $specialPageArray['deathray']['deathray'] = $title->getDBKey();
 
  return true;
}
